package com.cwnuzj.app.jokeworld;

import java.io.IOException;
import java.util.ArrayList;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import com.cwnuzj.app.jokeworld.form.JokeMessage;
import com.cwnuzj.app.jokeworld.util.HtmlParser;

public class Main {
	public static void main(String[] args) {
		Document doc = null;
		try {
			doc = Jsoup.connect("http://www.jokeji.cn").get();
		} catch (IOException e) {
			e.printStackTrace();
		}
		ArrayList<JokeMessage> messages = HtmlParser.getLatestJokeMessages(doc);
		for (JokeMessage message : messages) {
			System.out.println(message);
		}
	}
}
